-- GENERATED SPELL FOR [Deatheye] --


function spell0_8302(pUnit, Event) --@Call of the Grave,n/a--
pUnit:FullCastSpellOnTarget(5137,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8302', 2000, 1)
end

function spell1_8302(pUnit, Event) --@Crystal Gaze,n/a--
pUnit:FullCastSpellOnTarget(3635,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8302', 8000, 1)
end

function Sorts_8302(pUnit, Event)
local choix_sorts_8302 = math.random(0, 1)
if choix_sorts_8302 == 0 then
pUnit:RegisterEvent('spell0_8302', 1, 1)
end
if choix_sorts_8302 == 1 then
pUnit:RegisterEvent('spell1_8302', 1, 1)
end
end

function mob8302_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8302', math.random(1500, 3000), 1)
end

function mob8302_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8302_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8302_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8302, 1, 'mob8302_Action')
RegisterUnitEvent(8302, 2, 'mob8302_Leave')
RegisterUnitEvent(8302, 3, 'mob8302_Kill')
RegisterUnitEvent(8302, 4, 'mob8302_Die')
